/**
 * waypoint.cpp
 *
 * overgenomen van CppExample
 *
 * @author Pieter Nys <pieter-nys@hotmail.com>
 * @date    01/03/11
 */
#include <iostream>
#include <math.h>
#include "waypoint.h"
using namespace std;

WayPoint::WayPoint()
{
    this->setX(0);
    this->setY(0);
    this->setTheta(0);
    this->setTimeStamp(0);
    this->setKick(false);
}


WayPoint::WayPoint(int x, int y, float theta, double timestamp)
{
    this->setX(x);
    this->setY(y);
    this->setTheta(theta);
    this->setTimeStamp(timestamp);
}

WayPoint::~WayPoint()
{
}

/** Zet X-coordinaat
 *
 * @param x double
 */
void WayPoint::setX(int x)
{
	x_=x;
}

/** Get X-coordinaat
 *
 */
int WayPoint::getX()
{
	return x_;
}

void WayPoint::setY(int y)
{
	y_=y;
}

int WayPoint::getY()
{
	return y_;
}

/** Zet de hoek in radialen
 *
 * @param theta double
 */
void WayPoint::setTheta(float theta)
{
	theta_=theta;
}

/**
 *
 * @return double
 */
float WayPoint::getTheta()
{
	return theta_;
}


/**
 *
 * @param timestamp double
 */
void WayPoint::setTimeStamp(double timestamp)
{
	timestamp_=timestamp;
}

double WayPoint::getTimeStamp()
{
	return timestamp_;
}

void WayPoint::setKick(bool kick)
{
	kick_=kick;
}

bool WayPoint::getKick()
{
	return kick_;
}

double WayPoint::computeDistance(WayPoint wp)
{
	return sqrt((getX()-wp.getX())*(getX()-wp.getX()) + (getY()-wp.getY())*(getY()-wp.getY()));
}


void WayPoint::Properties()
{
	cout << "\nCharacteristics of this WayPoint";
	cout << "\nx   = " << getX();
	cout << "\ny   = " << getY();
	cout << "\ntheta = " << getTheta();
	cout << "\ntimestamp = " << getTimeStamp();
	cout << "\nkick = " << getKick() << endl;
}
